#include <stdlib.h>
#include <stdio.h>

#define N 1000

double randDouble() {
  double t = rand()/(double)RAND_MAX;
  double i = rand();
  return t+i;
}

int main(const int argc, const char* argv[])
{
    int loop;
    int i, k;
    double x[N], y[N];

   // if (argc != 2)
    //  exit(1);

    //loop = atoi(argv[1]);
	loop = 1000;

    for(i=0; i<N; i++) {
      x[i] = randDouble();
      y[i] = randDouble();
    }

    for(i=0; i<loop; i++) {
      x[0] = y[0];
      for (k=1; k<N; k++) {
        x[k] = x[k-1] + y[k];
        printf("%f", x[k]);
      }
    }
    return 0;
}
